//
//  UIImage+ESResizedImage.m
//  EasyStyle
//
//  Created by FK on 16/1/6.
//  Copyright © 2016年 FK. All rights reserved.
//

#import "UIImage+ESResizedImage.h"

@implementation UIImage (ESResizedImage)
#pragma mark 图片缩放
+ (UIImage *)resizedImage:(NSString *)imgName
{
    return [[self class] resizedImage:imgName xPos:0.5 yPos:0.5];
}

+ (UIImage *)resizedImage:(NSString *)imgName xPos:(CGFloat)xPos yPos:(CGFloat)yPos
{
    UIImage *image = [UIImage imageNamed:imgName];
    
    return [image stretchableImageWithLeftCapWidth:image.size.width * xPos topCapHeight:image.size.height * yPos];
}
@end
